Order Notification API

(0 reviews)

JWT validation

Chorus will provide a JSON Web Token (JWT) in the header of every notification message sent to your POST /orderNotification endpoint. This JWT needs to be validated to confirm that the message has been sent by Chorus and is intended for you.

Note: To avoid unexpected activity, we recommend you apply proper security practices to ensure the initial processing and validation of the notification is isolated from your core system processing.

Signature validation

The signature on the JWT can be validated using the JSON Web Key Set (JWKS) available on the Microsoft keystore. To perform the validation of the JWT provided as part of the header, use the following values in the header:

  • kid
  • x5t

Note: As Microsoft constantly updates keys, use the latest version of the JWKS for validation of the JWT.

Scope and environment

The following table provides the scopes used to access each environment for the Order Notification API.

EnvironmentOrder Notification API scope
Productionapi://ordernotification
Production EMMAapi://ordernotification-sandbox

JWT fields

The following table provides the details you will need to validate in the JWT provided by Chorus.

JWT fieldExpected value
audOrder Notification API scope for the relevant environment.
isshttps://sts.windows.net/41360c96-1755-4bf8-8527-81bb0ad2ac43/
idphttps://sts.windows.net/41360c96-1755-4bf8-8527-81bb0ad2ac43/
iatDatetime value prior to the current time.
nbfDatetime value prior to the current time.
expDatetime value after the current time.
roles.customerRefYour customer reference value in the following format: customerRef:<customerRef>

Reviews